package com.skt.common_hr.welfare.model.vo
{
	import com.wcl.utils.DateUtil;
	import com.wcl.utils.NumberUtil;
	import com.wcl.utils.StringUtil;
	
	import mx.formatters.DateFormatter;
	
	[Bindable]
	public class ReqWelfareVO
	{
		public var PERNR:String;	//사원번호
		public var ENAME:String;	//사원명 
		public var IDATE:Date;		//신청일
		public var UDATE:Date;		//사용일
		public var SEQNO:String;	//순번
		public var CAFGBN:String;	//사용유형
		public var CAFGTX:String;	//사용유형명
		public var CAFTY:String;	//사용항목
		public var CAFTX:String;	//사용항목명
		public var DTEXT:String;	//상세내역
		public var BNFAMT:Number;	//금액
		
		public var STGBN:String; 	//거래구분(국내,국외) <거래처정보>
		public var STGBN_TX:String; 	//거래구분(국내,국외) <거래처정보>
		public var STCD2:String; 	//사업자등록번호 (사업자번호 )
		public var COMNM:String; 	//업체명 ( 사업장명 )
		public var APGBN:String; 	//거래결재유형 ( 거래결재정보 )
		public var APGBN_TX:String; 	//거래결재유형 ( 거래결재정보 )
		public var CARDNO:String; 	//카드번호
		public var APNO:String; 	//승인번호
		
		public var PRINT_BNFAMT:String;	//금액

		public var del:Boolean = false;		// 삭제 여부
		
		public function get IDATE_F():String
		{
			return DateUtil.toDefaultString(IDATE);
		}
		
		public function get IDATE_FF():String
		{
			var date:Date = new Date();
			var formate:DateFormatter = new DateFormatter();
			formate.formatString = "YYYY.MM.DD";
			return formate.format(IDATE);
		}
		
		public function get UDATE_F():String
		{
			return DateUtil.toDefaultString(UDATE);
		}
		
		public function get UDATE_FF():String
		{
			var date:Date = new Date();
			var formate:DateFormatter = new DateFormatter();
			formate.formatString = "YYYY.MM.DD";
			return formate.format(UDATE);
		}
		
		public function get BNFAMT_F():String{
			return NumberUtil.NumberFormat(BNFAMT);
		}
		
		//사업자번호
		public function get STCD2_F():String{
			if(StringUtil.NVL(STCD2) == "") return "";
			return STCD2.substr(0,3) + "-" + STCD2.substr(3,2) + "-" + STCD2.substr(5,5);
		}
		public function get STCD2_F1():String{
			if(StringUtil.NVL(STCD2) == "") return "";
			return STCD2.substr(0,3);
		}
		public function get STCD2_F2():String{
			if(StringUtil.NVL(STCD2) == "") return "";
			return STCD2.substr(3,2);
		}
		public function get STCD2_F3():String{
			if(StringUtil.NVL(STCD2) == "") return "";
			return STCD2.substr(5,5);
		}
		
		//카드번호
		public function get CARDNO_F():String{
			if(StringUtil.NVL(CARDNO) == "") return "";
			return CARDNO.substr(0,4) + "-" + CARDNO.substr(4,4) + "-" + CARDNO.substr(8,4) + "-" + CARDNO.substr(12,4);
		}
		public function get CARDNO_F1():String{
			if(StringUtil.NVL(CARDNO) == "") return "";
			return CARDNO.substr(0,4);
		}
		public function get CARDNO_F2():String{
			if(StringUtil.NVL(CARDNO) == "") return "";
			return CARDNO.substr(4,4);
		}
		public function get CARDNO_F3():String{
			if(StringUtil.NVL(CARDNO) == "") return "";
			return CARDNO.substr(8,4);
		}
		public function get CARDNO_F4():String{
			if(StringUtil.NVL(CARDNO) == "") return "";
			return CARDNO.substr(12,4);
		}
	}
}